import request from '@/utils/request'

// 查询闪屏图片列表
export function listFlush(query) {
  return request({
    url: '/mysystem/flush/list',
    method: 'get',
    params: query
  })
}

// 查询闪屏图片详细
export function getFlush(flushScreenId) {
  return request({
    url: '/mysystem/flush/' + flushScreenId,
    method: 'get'
  })
}

// 新增闪屏图片
export function addFlush(data) {
  return request({
    url: '/mysystem/flush',
    method: 'post',
    data: data
  })
}

// 修改闪屏图片
export function updateFlush(data) {
  return request({
    url: '/mysystem/flush',
    method: 'put',
    data: data
  })
}

export function changeStatus(flushScreenId, status) {
  const data = {
    flushScreenId: flushScreenId,
    status
  }
  return request({
    url: '/mysystem/flush/changeStatus',
    method: 'put',
    data: data
  })
}
// 删除闪屏图片
export function delFlush(flushScreenId) {
  return request({
    url: '/mysystem/flush/' + flushScreenId,
    method: 'delete'
  })
}
